Optimal. Leaf size=364 \[ \frac{((30+28 i) A-(7-5 i) B) \tan ^{-1}\left (1-\sqrt{2} \sqrt{\tan (c+d x)}\right )}{16 \sqrt{2} a^3 d}-\frac{\left (\frac{1}{16}-\frac{i}{16}\right ) ((1+29 i) A-(6+i) B) \tan ^{-1}\left (\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{\sqrt{2} a^3 d}-\frac{5 (6 A+i B)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{7 (4 A+i B)}{24 d \sqrt{\tan (c+d x)} \left (a^3+i a^3 \tan (c+d x)\right )}-\frac{\left (\frac{1}{32}-\frac{i}{32}\right ) ((29+i) A+(1+6 i) B) \log \left (\tan (c+d x)-\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{\sqrt{2} a^3 d}+\frac{\left (\frac{1}{32}-\frac{i}{32}\right ) ((29+i) A+(1+6 i) B) \log \left (\tan (c+d x)+\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{\sqrt{2} a^3 d}+\frac{A+i B}{6 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^3}+\frac{5 A+2 i B}{12 a d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.804328, antiderivative size = 364, normalized size of antiderivative = 1., number of steps used = 14, number of rules used = 9, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3596, 3529, 3534, 1168, 1162, 617, 204, 1165, 628} \[ \frac{((30+28 i) A-(7-5 i) B) \tan ^{-1}\left (1-\sqrt{2} \sqrt{\tan (c+d x)}\right )}{16 \sqrt{2} a^3 d}-\frac{\left (\frac{1}{16}-\frac{i}{16}\right ) ((1+29 i) A-(6+i) B) \tan ^{-1}\left (\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{\sqrt{2} a^3 d}-\frac{5 (6 A+i B)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{7 (4 A+i B)}{24 d \sqrt{\tan (c+d x)} \left (a^3+i a^3 \tan (c+d x)\right )}-\frac{\left (\frac{1}{32}-\frac{i}{32}\right ) ((29+i) A+(1+6 i) B) \log \left (\tan (c+d x)-\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{\sqrt{2} a^3 d}+\frac{\left (\frac{1}{32}-\frac{i}{32}\right ) ((29+i) A+(1+6 i) B) \log \left (\tan (c+d x)+\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{\sqrt{2} a^3 d}+\frac{A+i B}{6 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^3}+\frac{5 A+2 i B}{12 a d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3596
Rule 3529
Rule 3534
Rule 1168
Rule 1162
Rule 617
Rule 204
Rule 1165
Rule 628
Rubi steps
\begin{align*} \int \frac{A+B \tan (c+d x)}{\tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^3} \, dx &=\frac{A+i B}{6 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^3}+\frac{\int \frac{\frac{1}{2} a (13 A+i B)-\frac{7}{2} a (i A-B) \tan (c+d x)}{\tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^2} \, dx}{6 a^2}\\ &=\frac{A+i B}{6 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^3}+\frac{5 A+2 i B}{12 a d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^2}+\frac{\int \frac{a^2 (31 A+4 i B)-5 a^2 (5 i A-2 B) \tan (c+d x)}{\tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))} \, dx}{24 a^4}\\ &=\frac{A+i B}{6 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^3}+\frac{5 A+2 i B}{12 a d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^2}+\frac{7 (4 A+i B)}{24 d \sqrt{\tan (c+d x)} \left (a^3+i a^3 \tan (c+d x)\right )}+\frac{\int \frac{15 a^3 (6 A+i B)-21 a^3 (4 i A-B) \tan (c+d x)}{\tan ^{\frac{3}{2}}(c+d x)} \, dx}{48 a^6}\\ &=-\frac{5 (6 A+i B)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{A+i B}{6 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^3}+\frac{5 A+2 i B}{12 a d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^2}+\frac{7 (4 A+i B)}{24 d \sqrt{\tan (c+d x)} \left (a^3+i a^3 \tan (c+d x)\right )}+\frac{\int \frac{-21 a^3 (4 i A-B)-15 a^3 (6 A+i B) \tan (c+d x)}{\sqrt{\tan (c+d x)}} \, dx}{48 a^6}\\ &=-\frac{5 (6 A+i B)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{A+i B}{6 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^3}+\frac{5 A+2 i B}{12 a d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^2}+\frac{7 (4 A+i B)}{24 d \sqrt{\tan (c+d x)} \left (a^3+i a^3 \tan (c+d x)\right )}+\frac{\operatorname{Subst}\left (\int \frac{-21 a^3 (4 i A-B)-15 a^3 (6 A+i B) x^2}{1+x^4} \, dx,x,\sqrt{\tan (c+d x)}\right )}{24 a^6 d}\\ &=-\frac{5 (6 A+i B)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{A+i B}{6 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^3}+\frac{5 A+2 i B}{12 a d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^2}+\frac{7 (4 A+i B)}{24 d \sqrt{\tan (c+d x)} \left (a^3+i a^3 \tan (c+d x)\right )}-\frac{((30+28 i) A-(7-5 i) B) \operatorname{Subst}\left (\int \frac{1+x^2}{1+x^4} \, dx,x,\sqrt{\tan (c+d x)}\right )}{16 a^3 d}+\frac{((30-28 i) A+(7+5 i) B) \operatorname{Subst}\left (\int \frac{1-x^2}{1+x^4} \, dx,x,\sqrt{\tan (c+d x)}\right )}{16 a^3 d}\\ &=-\frac{5 (6 A+i B)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{A+i B}{6 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^3}+\frac{5 A+2 i B}{12 a d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^2}+\frac{7 (4 A+i B)}{24 d \sqrt{\tan (c+d x)} \left (a^3+i a^3 \tan (c+d x)\right )}-\frac{((30+28 i) A-(7-5 i) B) \operatorname{Subst}\left (\int \frac{1}{1-\sqrt{2} x+x^2} \, dx,x,\sqrt{\tan (c+d x)}\right )}{32 a^3 d}-\frac{((30+28 i) A-(7-5 i) B) \operatorname{Subst}\left (\int \frac{1}{1+\sqrt{2} x+x^2} \, dx,x,\sqrt{\tan (c+d x)}\right )}{32 a^3 d}-\frac{((30-28 i) A+(7+5 i) B) \operatorname{Subst}\left (\int \frac{\sqrt{2}+2 x}{-1-\sqrt{2} x-x^2} \, dx,x,\sqrt{\tan (c+d x)}\right )}{32 \sqrt{2} a^3 d}-\frac{((30-28 i) A+(7+5 i) B) \operatorname{Subst}\left (\int \frac{\sqrt{2}-2 x}{-1+\sqrt{2} x-x^2} \, dx,x,\sqrt{\tan (c+d x)}\right )}{32 \sqrt{2} a^3 d}\\ &=-\frac{((30-28 i) A+(7+5 i) B) \log \left (1-\sqrt{2} \sqrt{\tan (c+d x)}+\tan (c+d x)\right )}{32 \sqrt{2} a^3 d}+\frac{((30-28 i) A+(7+5 i) B) \log \left (1+\sqrt{2} \sqrt{\tan (c+d x)}+\tan (c+d x)\right )}{32 \sqrt{2} a^3 d}-\frac{5 (6 A+i B)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{A+i B}{6 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^3}+\frac{5 A+2 i B}{12 a d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^2}+\frac{7 (4 A+i B)}{24 d \sqrt{\tan (c+d x)} \left (a^3+i a^3 \tan (c+d x)\right )}-\frac{((30+28 i) A-(7-5 i) B) \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1-\sqrt{2} \sqrt{\tan (c+d x)}\right )}{16 \sqrt{2} a^3 d}+\frac{((30+28 i) A-(7-5 i) B) \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1+\sqrt{2} \sqrt{\tan (c+d x)}\right )}{16 \sqrt{2} a^3 d}\\ &=\frac{((30+28 i) A-(7-5 i) B) \tan ^{-1}\left (1-\sqrt{2} \sqrt{\tan (c+d x)}\right )}{16 \sqrt{2} a^3 d}-\frac{((30+28 i) A-(7-5 i) B) \tan ^{-1}\left (1+\sqrt{2} \sqrt{\tan (c+d x)}\right )}{16 \sqrt{2} a^3 d}-\frac{((30-28 i) A+(7+5 i) B) \log \left (1-\sqrt{2} \sqrt{\tan (c+d x)}+\tan (c+d x)\right )}{32 \sqrt{2} a^3 d}+\frac{((30-28 i) A+(7+5 i) B) \log \left (1+\sqrt{2} \sqrt{\tan (c+d x)}+\tan (c+d x)\right )}{32 \sqrt{2} a^3 d}-\frac{5 (6 A+i B)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{A+i B}{6 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^3}+\frac{5 A+2 i B}{12 a d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^2}+\frac{7 (4 A+i B)}{24 d \sqrt{\tan (c+d x)} \left (a^3+i a^3 \tan (c+d x)\right )}\\ \end{align*}
Mathematica [A] time = 3.14356, size = 278, normalized size = 0.76 \[ \frac{\sec ^2(c+d x) (\cos (d x)+i \sin (d x))^3 (A+B \tan (c+d x)) \left (\frac{2}{3} (\cos (3 d x)-i \sin (3 d x)) ((49 A+19 i B) \cos (c+d x)-(145 A+19 i B) \cos (3 (c+d x))+6 \sin (c+d x) (7 (B-7 i A) \cos (2 (c+d x))-19 i A+2 B))+(-\sin (3 c)+i \cos (3 c)) \sqrt{\sin (2 (c+d x))} \sec (c+d x) \left (((28-30 i) A+(5+7 i) B) \sin ^{-1}(\cos (c+d x)-\sin (c+d x))-(1+i) ((29+i) A+(1+6 i) B) \log \left (\sin (c+d x)+\sqrt{\sin (2 (c+d x))}+\cos (c+d x)\right )\right )\right )}{32 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^3 (A \cos (c+d x)+B \sin (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.058, size = 368, normalized size = 1. \begin{align*} -{\frac{7\,A}{4\,{a}^{3}d \left ( \tan \left ( dx+c \right ) -i \right ) ^{3}} \left ( \tan \left ( dx+c \right ) \right ) ^{{\frac{5}{2}}}}-{\frac{{\frac{5\,i}{8}}B}{{a}^{3}d \left ( \tan \left ( dx+c \right ) -i \right ) ^{3}} \left ( \tan \left ( dx+c \right ) \right ) ^{{\frac{5}{2}}}}+{\frac{{\frac{49\,i}{12}}A}{{a}^{3}d \left ( \tan \left ( dx+c \right ) -i \right ) ^{3}} \left ( \tan \left ( dx+c \right ) \right ) ^{{\frac{3}{2}}}}-{\frac{19\,B}{12\,{a}^{3}d \left ( \tan \left ( dx+c \right ) -i \right ) ^{3}} \left ( \tan \left ( dx+c \right ) \right ) ^{{\frac{3}{2}}}}+{\frac{{\frac{9\,i}{8}}B}{{a}^{3}d \left ( \tan \left ( dx+c \right ) -i \right ) ^{3}}\sqrt{\tan \left ( dx+c \right ) }}+{\frac{5\,A}{2\,{a}^{3}d \left ( \tan \left ( dx+c \right ) -i \right ) ^{3}}\sqrt{\tan \left ( dx+c \right ) }}-{\frac{{\frac{3\,i}{2}}B}{{a}^{3}d \left ( \sqrt{2}-i\sqrt{2} \right ) }\arctan \left ( 2\,{\frac{\sqrt{\tan \left ( dx+c \right ) }}{\sqrt{2}-i\sqrt{2}}} \right ) }-{\frac{29\,A}{4\,{a}^{3}d \left ( \sqrt{2}-i\sqrt{2} \right ) }\arctan \left ( 2\,{\frac{\sqrt{\tan \left ( dx+c \right ) }}{\sqrt{2}-i\sqrt{2}}} \right ) }-{\frac{A}{4\,{a}^{3}d \left ( \sqrt{2}+i\sqrt{2} \right ) }\arctan \left ( 2\,{\frac{\sqrt{\tan \left ( dx+c \right ) }}{\sqrt{2}+i\sqrt{2}}} \right ) }+{\frac{{\frac{i}{4}}B}{{a}^{3}d \left ( \sqrt{2}+i\sqrt{2} \right ) }\arctan \left ( 2\,{\frac{\sqrt{\tan \left ( dx+c \right ) }}{\sqrt{2}+i\sqrt{2}}} \right ) }-2\,{\frac{A}{{a}^{3}d\sqrt{\tan \left ( dx+c \right ) }}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.09988, size = 2071, normalized size = 5.69 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.2536, size = 225, normalized size = 0.62 \begin{align*} -\frac{\left (i + 1\right ) \, \sqrt{2}{\left (29 \, A + 6 i \, B\right )} \arctan \left (\left (\frac{1}{2} i + \frac{1}{2}\right ) \, \sqrt{2} \sqrt{\tan \left (d x + c\right )}\right )}{16 \, a^{3} d} - \frac{\left (i + 1\right ) \, \sqrt{2}{\left (i \, A + B\right )} \arctan \left (\left (\frac{1}{2} i - \frac{1}{2}\right ) \, \sqrt{2} \sqrt{\tan \left (d x + c\right )}\right )}{16 \, a^{3} d} - \frac{2 \, A}{a^{3} d \sqrt{\tan \left (d x + c\right )}} - \frac{42 i \, A \tan \left (d x + c\right )^{\frac{5}{2}} - 15 \, B \tan \left (d x + c\right )^{\frac{5}{2}} + 98 \, A \tan \left (d x + c\right )^{\frac{3}{2}} + 38 i \, B \tan \left (d x + c\right )^{\frac{3}{2}} - 60 i \, A \sqrt{\tan \left (d x + c\right )} + 27 \, B \sqrt{\tan \left (d x + c\right )}}{24 \, a^{3} d{\left (-i \, \tan \left (d x + c\right ) - 1\right )}^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]